-- GENERATED SPELL FOR [Va'jashni] --


function spell0_16055(pUnit, Event) --@Dispel Magic,n/a--
pUnit:FullCastSpellOnTarget(27609,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_16055', 544, 1)
end

function spell1_16055(pUnit, Event) --@Drink Healing Potion,Self--
pUnit:FullCastSpellOnTarget(15503,pUnit)
pUnit:RegisterEvent('Sorts_16055', 638, 1)
end

function spell2_16055(pUnit, Event) --@Flash Heal,Heal--
pUnit:FullCastSpellOnTarget(27608,pUnit)
pUnit:RegisterEvent('Sorts_16055', 1500, 1)
end

function spell3_16055(pUnit, Event) --@Power Word: Shield,n/a--
pUnit:FullCastSpellOnTarget(27607,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_16055', 30000, 1)
end

function spell4_16055(pUnit, Event) --@Renew,Heal--
pUnit:FullCastSpellOnTarget(27606,pUnit)
pUnit:RegisterEvent('Sorts_16055', 15000, 1)
end

function spell5_16055(pUnit, Event) --@Shadow Word: Pain,n/a--
pUnit:FullCastSpellOnTarget(27605,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_16055', 18000, 1)
end

function Sorts_16055(pUnit, Event)
local choix_sorts_16055 = math.random(0, 5)
if choix_sorts_16055 == 0 then
pUnit:RegisterEvent('spell0_16055', 1, 1)
end
if choix_sorts_16055 == 1 then
pUnit:RegisterEvent('spell1_16055', 1, 1)
end
if choix_sorts_16055 == 2 then
pUnit:RegisterEvent('spell2_16055', 1, 1)
end
if choix_sorts_16055 == 3 then
pUnit:RegisterEvent('spell3_16055', 1, 1)
end
if choix_sorts_16055 == 4 then
pUnit:RegisterEvent('spell4_16055', 1, 1)
end
if choix_sorts_16055 == 5 then
pUnit:RegisterEvent('spell5_16055', 1, 1)
end
end

function mob16055_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_16055', math.random(1500, 3000), 1)
end

function mob16055_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob16055_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob16055_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(16055, 1, 'mob16055_Action')
RegisterUnitEvent(16055, 2, 'mob16055_Leave')
RegisterUnitEvent(16055, 3, 'mob16055_Kill')
RegisterUnitEvent(16055, 4, 'mob16055_Die')
